import { Access, useAccess } from '@umijs/max';
import { Button } from 'antd';
import { terminal } from 'umi';

export default () => {
  const access = useAccess();
  //控制台提示
  terminal.log('i am log level');
  terminal.warn('i am warn level');
  terminal.error('i am error level');

  console.log(access);

  return (
    <div>
      <Access accessible={access.AccessGet}>
        <Button>只有 Admin 可以看到这个按钮</Button>
      </Access>
    </div>
  );
};
